package com.cd.common.util;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * @Description 这里存放一些常用的状态码，成功则返回200，失败返回其他
 * @Author lqq
 * @Date 2023/11/18 10:49
 **/
@AllArgsConstructor
@NoArgsConstructor
public enum LqqStatusEnum {

    LQQ_SUCCESS(9000, "操作成功"),
    LQQ_USER_NOT_EXIST(9001, "用户不存在"),
    LQQ_NOT_PERMISSION(9002, "无操作权限"),
    LQQ_USER_ACCOUNT_LOCKED(9003, "账号被锁定"),
    LQQ_USER_ACCOUNT_NOT_ACTIVATED(9004, "账号未激活"),
    LQQ_USER_ACCOUNT_EXPIRED(9005, "账号过期"),
    LQQ_USER_ACCOUNT_DISABLED(9006, "账号被禁用"),
    LQQ_USER_ACCOUNT_NOT_FOUND(9007, "账号不存在"),
    LQQ_USER_EXIST(9007, "账号已存在"),
    //@Deprecated
    LQQ_USER_ACCOUNT_PASSWORD_ERROR(9008, "密码错误"),
    LQQ_USER_ACCOUNT_PASSWORD_NOT_MATCH(9009, "两次密码不一致"),
    LQQ_USER_ACCOUNT_PASSWORD_TOO_SIMPLE(9010, "密码过于简单"),
    LQQ_SYSTEM_ERROR(500, "系统异常"),
    LQQ_NOT_IMPLEMENTED(9011, "功能未实现"),//功能未实现
    LQQ_ILLEGAL_OPERATION(9012, "非法操作"),
    LQQ_TIME_PERMISSION_ERROR(9013, "功能未开放"),//时间权限错误
    LQQ_JPA_SAVE_ERROR(9014, "存储失败"),
    LQQ_JPA_UPDATE_ERROR(9015, "更新数据失败"),
    LQQ_JPA_DELETE_ERROR(9016, "删除数据失败"),
    LQQ_JPA_QUERY_ERROR(9017, "查询数据失败"),
    LQQ_JPA_QUERY_NOT_FOUND(9018, "查询数据为空"),
    LQQ_REGISTER_DISABLE(9019, "注册已关闭" ),
    //参数缺失
    LQQ_PARAM_MISSING(9020, "参数缺失"),
    LQQ_PARAM_ERROR(9021, "参数错误"),
    LQQ_USERNAME_ILLEGAL(9022, "用户名非法");

    private int code;
    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

}
